﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using static S.Archives.Api.Application.Command.生产提示.ProductionPromptCommand;

namespace S.Archives.Read.Api.Controllers
{
    /// <summary>
    /// 控制器—生产提示
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ProductionPromptController : ControllerBase
    {
        private readonly IMediator mediator;

        public ProductionPromptController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 显示生产提示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> GetProductionPrompt()
        {
            GetProductionPromptCommand command = new GetProductionPromptCommand();
            return Ok(await mediator.Send(command));
        }
    }
}
